/* ==================
          文本
 ==================== */
@use 'sass:math';

.font-0 {
  font-size: 12px;

  --vin-text-size: -2px;
}
.font-1 {
  font-size: 14px;

  /* stylelint-disable-line */
  --vin-text-size: 0px;
}
.font-2 {
  font-size: 16px;

  --vin-text-size: 2px;
}
.font-3 {
  font-size: 18px;

  --vin-text-size: 4px;
}
.font-4 {
  font-size: 20px;

  --vin-text-size: 6px;
}

.text {
  @each $class, $value in $fontsize {
    &-#{$class},
    &-#{math.div($value, 2)} {
      font-size: calc(#{$value}px + var(--vin-text-size)) !important;
    }
  }
  &-cut {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  @at-root [class*='text-linecut'] {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-all;
  }
  @for $i from 2 through 10 {
    &-linecut-#{$i} {
      -webkit-line-clamp: #{$i};
    }
  }

  &-left {
    text-align: left;
  }
  &-center {
    text-align: center;
  }
  &-right {
    text-align: right;
  }
  &-justify {
    text-align: justify;
  }
  &-justify-line {
    margin-top: 0.5em;
    line-height: 0.5em;
    text-align: justify;
    &::after {
      display: inline-block;
      width: 100%;
      content: '.';
    }
  }

  &-Abc {
    text-transform: capitalize !important;
  }
  &-ABC {
    text-transform: uppercase !important;
  }
  &-abc {
    text-transform: lowercase !important;
  }
  &-del,
  &-line {
    text-decoration: line-through !important;
  }
  &-bottomline {
    text-decoration: underline !important;
  }
  &-italic {
    font-style: italic !important;
  }
  &-style-none {
    text-decoration: none !important;
  }
  &-break {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  &-reset {
    color: inherit !important;
  }
  &-price::before {
    margin-right: 2px;
    font-size: 80%;
    content: '¥';
  }
  &-hide {
    color: transparent;
    font: 0/0 a;
    text-shadow: none;
    background-color: transparent;
    border: 0;
  }
}
